
import httpurl from './httpurl.js'
import requestClient from './request.js'

export default{
    getRoleList:function(client,sucCallback){
        requestClient.request(client,httpurl.roleList,"GET",null,sucCallback,null,null)
    },
    addRole:function(client,data,sucCallback){
        requestClient.request(client,httpurl.roleAdd,"POST",data,sucCallback,null,null)
    },
    getRoleRightIds:function(client,roleId,sucCallback){
        var data = { roleId : roleId};
        requestClient.request(client,httpurl.roleRightIds,"GET",data,sucCallback,null,null)
    },
    updateRoleRightIds:function(client,data,sucCallback){
        requestClient.request(client,httpurl.roleRightUpdate,"POST",data,sucCallback,null,null)
    },
    deleteRole:function(client,data,sucCallback){
        requestClient.request(client,httpurl.roleDelete,"POST",data,sucCallback,null,null)
    }
}